<!-- 添加渔塘记录 -->
<template>
  <div class="add-record">

    <van-nav-bar @click-right="onClickRight" safe-area-inset-top style="background: rgb(77, 173, 249)">
      <!-- <template #right>
        <img style="width: 25px" src="../../assets/images/加号.png" alt="" />
      </template> -->
    </van-nav-bar>
    <!-- 顶部tab -->
    <van-tabs class="tabbar" v-model="tabbar" color="rgb(77, 173, 249)" background="none" title-active-color="#fff"
      title-inactive-color="rgsb(203, 232, 245)" @click="onClick">
      <van-tab name="1" title="巡塘记录">
        <add-patrol-record :list="list"></add-patrol-record>
      </van-tab>
      <van-tab name="2" title="用药记录">
        <add-feed-record :list="list"></add-feed-record>
      </van-tab>
      <van-tab name="3" title="卖出记录">
        <add-sell-record :list="list"></add-sell-record>
      </van-tab>
    </van-tabs>
  </div>
</template>

<script>
import Bus from '../../utils/bus.js'
import addSellRecord from "./module/add-sell-record.vue";
import addFeedRecord from "./module/add-feed-record.vue";
import addPatrolRecord from "./module/add-patrol-record.vue";
export default {
  name: "",
  components: {
    addSellRecord,
    addFeedRecord,
    addPatrolRecord,
  },
  data() {
    return {
      tabbar: "1",
      list: [],
      arealist: []
    };
  },
  methods: {
    onClick() {
      // 点击切换tab栏 切换list数据
    },
    // 添加记录
    onClickRight() { },

  },
  computed: {},
  watch: {},
  created() {
    if (this.$route.query.type) {
      this.tabbar = this.$route.query.type;
    }
  },
  mounted() {




  },
};
</script>

<style lang="scss" scoped>
:deep(.van-tabs__content) {
  width: 100vw;
}

.add-record {
  width: 100%;
  height: 100%;
  position: relative;

  .tabbar {
    width: 80%;
    position: absolute;
    top: 2px;
    z-index: 999;
  }
}
</style>